using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class PKT_AcctBalancesMap : EntityTypeConfiguration<PKT_AcctBalances>
    {
        public PKT_AcctBalancesMap()
        {
            // Primary Key
            this.HasKey(t => new { t.spid, t.id });

            // Properties
            this.Property(t => t.spid)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.Property(t => t.Acct)
                .HasMaxLength(40);

            this.Property(t => t.PKT_AcctBal_PartyID)
                .HasMaxLength(10);

            this.Property(t => t.pkt_AcctBal_Type)
                .HasMaxLength(2);

            // Table & Column Mappings
            this.ToTable("PKT_AcctBalances");
            this.Property(t => t.spid).HasColumnName("spid");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.Acct).HasColumnName("Acct");
            this.Property(t => t.CstCtrID).HasColumnName("CstCtrID");
            this.Property(t => t.OpeningDebitAcct).HasColumnName("OpeningDebitAcct");
            this.Property(t => t.OpeningDebitBase1).HasColumnName("OpeningDebitBase1");
            this.Property(t => t.OpeningDebitBase2).HasColumnName("OpeningDebitBase2");
            this.Property(t => t.OpeningCreditAcct).HasColumnName("OpeningCreditAcct");
            this.Property(t => t.OpeningCreditBase1).HasColumnName("OpeningCreditBase1");
            this.Property(t => t.OpeningCreditBase2).HasColumnName("OpeningCreditBase2");
            this.Property(t => t.MovementDebitAcct).HasColumnName("MovementDebitAcct");
            this.Property(t => t.MovementDebitBase1).HasColumnName("MovementDebitBase1");
            this.Property(t => t.MovementDebitBase2).HasColumnName("MovementDebitBase2");
            this.Property(t => t.MovementCreditAcct).HasColumnName("MovementCreditAcct");
            this.Property(t => t.MovementCreditBase1).HasColumnName("MovementCreditBase1");
            this.Property(t => t.MovementCreditBase2).HasColumnName("MovementCreditBase2");
            this.Property(t => t.TotalDebitAcct).HasColumnName("TotalDebitAcct");
            this.Property(t => t.TotalDebitBase1).HasColumnName("TotalDebitBase1");
            this.Property(t => t.TotalDebitBase2).HasColumnName("TotalDebitBase2");
            this.Property(t => t.TotalCreditAcct).HasColumnName("TotalCreditAcct");
            this.Property(t => t.TotalCreditBase1).HasColumnName("TotalCreditBase1");
            this.Property(t => t.TotalCreditBase2).HasColumnName("TotalCreditBase2");
            this.Property(t => t.BalanceDebitAcct).HasColumnName("BalanceDebitAcct");
            this.Property(t => t.BalanceDebitBase1).HasColumnName("BalanceDebitBase1");
            this.Property(t => t.BalanceDebitBase2).HasColumnName("BalanceDebitBase2");
            this.Property(t => t.BalanceCreditAcct).HasColumnName("BalanceCreditAcct");
            this.Property(t => t.BalanceCreditBase1).HasColumnName("BalanceCreditBase1");
            this.Property(t => t.BalanceCreditBase2).HasColumnName("BalanceCreditBase2");
            this.Property(t => t.OpeningDebitOtherCurrency).HasColumnName("OpeningDebitOtherCurrency");
            this.Property(t => t.OpeningCreditOtherCurrency).HasColumnName("OpeningCreditOtherCurrency");
            this.Property(t => t.MovementDebitOtherCurrency).HasColumnName("MovementDebitOtherCurrency");
            this.Property(t => t.MovementCreditOtherCurrency).HasColumnName("MovementCreditOtherCurrency");
            this.Property(t => t.TotalDebitOtherCurrency).HasColumnName("TotalDebitOtherCurrency");
            this.Property(t => t.TotalCreditOtherCurrency).HasColumnName("TotalCreditOtherCurrency");
            this.Property(t => t.BalanceDebitOtherCurrency).HasColumnName("BalanceDebitOtherCurrency");
            this.Property(t => t.BalanceCreditOtherCurrency).HasColumnName("BalanceCreditOtherCurrency");
            this.Property(t => t.PKT_AcctBal_PartyID).HasColumnName("PKT_AcctBal_PartyID");
            this.Property(t => t.PKT_AcctBal_Classification).HasColumnName("PKT_AcctBal_Classification");
            this.Property(t => t.pkt_AcctBal_Type).HasColumnName("pkt_AcctBal_Type");
        }
    }
}
